package cn.itcast.daggerdemo;

import dagger.Module;
import dagger.Provides;

/**
 * Created by Administrator on 2016/8/4.
 */

@ActivityScope
@Module
public class ActivityModule {

    private MainActivity mainActivity;

    public ActivityModule(MainActivity mainActivity) {
        this.mainActivity = mainActivity;
    }

    @Provides
    public MainActivity provideMainActivity() {

        return mainActivity;
    }

    @Provides
    public DaggerPresenter prodiveDaggerPresenter(MainActivity mainActivity) {

        return new DaggerPresenter(mainActivity);
    }


}
